-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#530]: Profile avatar is now either Github profile picture, or capitalized first letter of username #534
base: main
Are you sure you want to change the base?
Conversation
…re, or capitalized 1st letter of username if the former is not applicable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, Mehdi!
Good work! This is exactly what I talked about!
You need to fix some lint and prettier errors in your solution
x="50%" | ||
y="52%" | ||
textAnchor="middle" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move up textAnchor prop above x
and y
imageExists(url).then((exists) => setGithubExists(exists)); | ||
}, [username]); | ||
|
||
//This function takes the first letter of the username and converts it to uppercase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a whitespace between //
construction and text of comment
//This function takes the first letter of the username and converts it to uppercase | ||
const capitalizeFirstLetter = (string) => { | ||
return string.charAt(0).toUpperCase(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add ;
Hi, thanks for participating! Please see the tests, what needs to be fixed. |
Hi @sergiozeppo! |
Hi! It has one problem: the username can be occupied by another user. Anyone can enter any username. So, we need to add this feature to the backend. |
Hi @dzencot ! The problem is really is, but I don't think that it's related both to this issue or PR. |
Let's draw a simple picture (no copyright) and display it instead of the avatar? And create a separate task to request the avatar url. |
If the user signs in with Github, their profile avatar will automatically become their GitHub profile picture, like this screenshot below:
Otherwise, if the user signed in traditionally, then the first letter of their username will be capitalized and used as avatar to enhance UX, as show in the screenshot below: